home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat2 / standard / sproc.z / sproc
Encoding:
Text File  |  2002-10-03  |  28.5 KB  |  463 lines

  1.  
  2.  
  3.  
  4. SSSSPPPPRRRROOOOCCCC((((2222))))                                                              SSSSPPPPRRRROOOOCCCC((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      sproc, sprocsp, nsproc - create a new share group process
  10.  
  11. CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttyyyyppppeeeessss....hhhh>>>>
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////pppprrrrccccttttllll....hhhh>>>>
  14.  
  15.      ppppiiiidddd____tttt sssspppprrrroooocccc ((((vvvvooooiiiidddd ((((****eeeennnnttttrrrryyyy)))) ((((vvvvooooiiiidddd ****)))),,,, uuuunnnnssssiiiiggggnnnneeeedddd iiiinnnnhhhh,,,, ............))));;;;
  16.  
  17.      Type of optional third argument:
  18.      vvvvooooiiiidddd ****aaaarrrrgggg;;;;
  19.  
  20.      ppppiiiidddd____tttt sssspppprrrrooooccccsssspppp ((((vvvvooooiiiidddd ((((****eeeennnnttttrrrryyyy)))) ((((vvvvooooiiiidddd ****,,,, ssssiiiizzzzeeee____tttt)))),,,, uuuunnnnssssiiiiggggnnnneeeedddd iiiinnnnhhhh,,,,
  21.                     vvvvooooiiiidddd ****aaaarrrrgggg,,,, ccccaaaaddddddddrrrr____tttt sssspppp,,,, ssssiiiizzzzeeee____tttt lllleeeennnn))));;;;
  22.  
  23. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  24.      The _ssss_pppp_rrrr_oooo_cccc and _ssss_pppp_rrrr_oooo_cccc_ssss_pppp system calls are a variant of the standard _ffff_oooo_rrrr_kkkk(2)
  25.      call.  Like _ffff_oooo_rrrr_kkkk, the _ssss_pppp_rrrr_oooo_cccc calls create a new process that is a clone of
  26.      the calling process.  The difference is that after an _ssss_pppp_rrrr_oooo_cccc call, the new
  27.      child process shares the virtual address space of the parent process
  28.      (assuming that this sharing option is selected, as described below),
  29.      rather than simply being a copy of the parent.  The parent and the child
  30.      each have their own program counter value and stack pointer, but all the
  31.      text and data space is visible to both processes.  This provides one of
  32.      the basic mechanisms upon which parallel programs can be built.
  33.  
  34.      The system call _nnnn_ssss_pppp_rrrr_oooo_cccc is no longer supported as an external interface;
  35.      any calls to it should be replaced with _ssss_pppp_rrrr_oooo_cccc_ssss_pppp.
  36.  
  37.      A group of processes created by _ssss_pppp_rrrr_oooo_cccc calls from a common ancestor is
  38.      referred to as a _s_h_a_r_e _g_r_o_u_p or _s_h_a_r_e_d _p_r_o_c_e_s_s _g_r_o_u_p.  A share group is
  39.      initially formed when a process first executes an _ssss_pppp_rrrr_oooo_cccc or _ssss_pppp_rrrr_oooo_cccc_ssss_pppp call.
  40.      All subsequent _ssss_pppp_rrrr_oooo_cccc calls by either the parent or other children in this
  41.      share group will add another process to the share group.  In addition to
  42.      virtual address space, members of a share group can share other
  43.      attributes such as file tables, current working directories, effective
  44.      userids and others described below.
  45.  
  46.      The three calls differ in just two ways - how the stack for the new
  47.      process is initialized and in the interpretation of the iiiinnnnhhhh argument.  If
  48.      the argument _s_p is set to NNNNUUUULLLLLLLL then the system will create a stack region
  49.      for the child.  This stack region will not overlap with any other area of
  50.      the share group's address space.  These stack regions grow downward, and
  51.      are automatically grown if the process accesses new areas of the stack.
  52.      The _l_e_n argument specifies how much margin (in bytes) the system should
  53.      attempt to leave for the child's stack.  This margin is used when the
  54.      system attempts to place additional stacks or other virtual spaces (e.g.
  55.      from _mmmm_mmmm_aaaa_pppp).  The system will attempt to leave enough room such that the
  56.      stack could grow to _l_e_n bytes if it needs to.  This margin in no way sets
  57.      a limit on stack growth nor guarantees a particular stack size.  The
  58.      process can continue to grow its stack up to the maximum permissible size
  59.      (specified via the resource limit _RRRR_LLLL_IIII_MMMM_IIII_TTTT______SSSS_TTTT_AAAA_CCCC_KKKK) as long as it doesn't run
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SSSSPPPPRRRROOOOCCCC((((2222))))                                                              SSSSPPPPRRRROOOOCCCC((((2222))))
  71.  
  72.  
  73.  
  74.      into any other virtual space of the share group.  Conversely, if the
  75.      share group's virtual space gets crowded, parts of the stack that haven't
  76.      yet been claimed could be used for additional stacks or other requested
  77.      virtual spaces.  A minimum of 16K for _l_e_n is recommended.  Note that
  78.      there are no 'red' zones - a process growing its stack could easily start
  79.      accessing the stack of another process in the share group.
  80.  
  81.      If _l_e_n is set to be smaller than the stack size required by the sproc at
  82.      creation time, an error message indicating that there is "not enough
  83.      memory to lock stack" may be reported to the system log. This indicates
  84.      that the system attempted to place the sproc's stack using the _l_e_n value
  85.      supplied in the _ssss_pppp_rrrr_oooo_cccc_ssss_pppp call, but that the initial size of the sproc's
  86.      stack would overlap into other portions of the share group's virtual
  87.      space.  The offending sproc will be killed.
  88.  
  89.      If _s_p is set to a valid virtual address in the share group then the stack
  90.      of the new process is set to this value.  With this option, the entire
  91.      responsibility of stack management is the calling process's.  The system
  92.      will no longer attempt to automatically grow the process's stack region.
  93.      _s_p should point to the top (highest address) of the new stack. It will
  94.      automatically be rounded down to provide the appropriate alignment.  No
  95.      validity checks are made on _s_p.
  96.  
  97.      _ssss_pppp_rrrr_oooo_cccc is equivalent to calling _ssss_pppp_rrrr_oooo_cccc_ssss_pppp with the _s_p argument set to NNNNUUUULLLLLLLL
  98.      and the _l_e_n argument set to the _r_l_i_m__c_u_r value of the resource limit
  99.      RRRRLLLLIIIIMMMMIIIITTTT____SSSSTTTTAAAACCCCKKKK.  This means that each time a process calls _ssss_pppp_rrrr_oooo_cccc, the total
  100.      size of each member of the share group increases by the size of the new
  101.      process's stack.
  102.  
  103.      Calling _ssss_pppp_rrrr_oooo_cccc or _ssss_pppp_rrrr_oooo_cccc_ssss_pppp too often, when the stack size is set very large
  104.      can easily cause the share group to grow larger than the per-process
  105.      maximum allowable size {_P_R_O_C_S_I_Z_E__M_A_X} [see _iiii_nnnn_tttt_rrrr_oooo(2)].  In this case, the
  106.      call will fail and return EEEENNNNOOOOMMMMEEEEMMMM.
  107.  
  108.      A process with lots of distinct virtual spaces (e.g. lots of files mapped
  109.      via _mmmm_mmmm_aaaa_pppp(2)) can fragment the calling process's address space such that
  110.      it is impossible to find a suitable place for the new child's stack.
  111.      This case will also cause _ssss_pppp_rrrr_oooo_cccc or _ssss_pppp_rrrr_oooo_cccc_ssss_pppp to fail.
  112.  
  113.      The new child process resulting from _ssss_pppp_rrrr_oooo_cccc(2) differs from a normally
  114.      forked process in the following ways:
  115.  
  116.         If the PPPPRRRR____SSSSAAAADDDDDDDDRRRR bit is set in _i_n_h then the new process will share ALL
  117.         the virtual space of the parent, except the PRDA (see below).  During
  118.         a normal _ffff_oooo_rrrr_kkkk(2) or if the PPPPRRRR____SSSSAAAADDDDDDDDRRRR is not set, the writable portions
  119.         of the process's address space are marked copy-on-write.  If either
  120.         process writes into a given page, then a copy is made of the page and
  121.         given to the process.  Thus writes by one process will not be visible
  122.         to the other forks.  With the PPPPRRRR____SSSSAAAADDDDDDDDRRRR option of _ssss_pppp_rrrr_oooo_cccc_((((_2222_)))), however,
  123.         all the processes have read/write privileges to the entire virtual
  124.         space.
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SSSSPPPPRRRROOOOCCCC((((2222))))                                                              SSSSPPPPRRRROOOOCCCC((((2222))))
  137.  
  138.  
  139.  
  140.         The new process can reference the parent's stack.
  141.  
  142.         The new process has its own _p_r_o_c_e_s_s _d_a_t_a _a_r_e_a (PRDA) which contains,
  143.         among other things, the _p_r_o_c_e_s_s _i_d.  Part of the PRDA is used by the
  144.         system, part by system libraries, and part is available to the
  145.         application program [see <<<<ssssyyyyssss////pppprrrrccccttttllll....hhhh>>>>].  The PRDA is at a fixed
  146.         virtual address in each process which is given by the constant PPPPRRRRDDDDAAAA
  147.         defined in pppprrrrccccttttllll....hhhh.
  148.  
  149.         The machine state (general/floating point registers) is not duplicated
  150.         with the exception of the floating point control register.  This means
  151.         that if a process has enabled floating point traps, these will be
  152.         enabled in the child process.
  153.  
  154.         If created via _ssss_pppp_rrrr_oooo_cccc the new process will be invoked as follows:
  155.  
  156.                     eeeennnnttttrrrryyyy((((vvvvooooiiiidddd ****aaaarrrrgggg))))
  157.  
  158.         If created via _ssss_pppp_rrrr_oooo_cccc_ssss_pppp the new process will be invoked as follows:
  159.  
  160.                     eeeennnnttttrrrryyyy((((vvvvooooiiiidddd ****aaaarrrrgggg,,,, ssssiiiizzzzeeee____tttt ssssttttkkkkssssiiiizzzzeeee))))
  161.  
  162.         where _s_t_k_s_i_z_e is the _l_e_n argument the parent passed to _ssss_pppp_rrrr_oooo_cccc_ssss_pppp.
  163.  
  164.      In addition to the attributes inherited during the _ssss_pppp_rrrr_oooo_cccc call itself, the
  165.      _i_n_h flag to _ssss_pppp_rrrr_oooo_cccc can request that the new process have future changes in
  166.      any member of the share group be applied to itself.  A process can only
  167.      request that a child process share attributes that it itself is sharing.
  168.      The creator of a share group is effectively sharing everything.  These
  169.      persisting attributes are selectable via the _i_n_h flag:
  170.  
  171.      PPPPRRRR____SSSSAAAADDDDDDDDRRRR  All virtual space attributes (shared memory, mapped files, data
  172.                space) are shared.  If one process in a share group attaches to
  173.                a shared memory segment, all processes in the group can access
  174.                that segment.
  175.  
  176.      PPPPRRRR____SSSSFFFFDDDDSSSS   The open file table is kept synchronized.  If one member of the
  177.                share group opens a file, the open file descriptor will appear
  178.                in the file tables of all members of the share group.
  179.  
  180.                Note especially that the converse is also true: if one member
  181.                closes a file, it is closed for all members of the group; this
  182.                has been known to surprise applications programmers!  Note also
  183.                that there is only one file pointer for each file descriptor
  184.                shared within a shared process group.
  185.  
  186.      PPPPRRRR____SSSSDDDDIIIIRRRR   The current and root directories are kept synchronized.  If one
  187.                member of the group issues a _cccc_hhhh_dddd_iiii_rrrr(2) or _cccc_hhhh_rrrr_oooo_oooo_tttt(2) call, the
  188.                current working directory or root directory will be changed for
  189.                all members of the share group.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. SSSSPPPPRRRROOOOCCCC((((2222))))                                                              SSSSPPPPRRRROOOOCCCC((((2222))))
  203.  
  204.  
  205.  
  206.      PPPPRRRR____SSSSUUUUMMMMAAAASSSSKKKK The file creation mask, _u_m_a_s_k is kept synchronized.
  207.  
  208.      PPPPRRRR____SSSSUUUULLLLIIIIMMMMIIIITTTT
  209.                The limit on maximum file size is kept synchronized.
  210.  
  211.      PPPPRRRR____SSSSIIIIDDDD    The real and effective user and group ids are kept
  212.                synchronized.
  213.  
  214.      To take advantage of sharing all possible attributes, the constant
  215.      PPPPRRRR____SSSSAAAALLLLLLLL may be used.
  216.  
  217.      In addition to specifying shared attributes, the _i_n_h flag can be used to
  218.      pass flags that govern certain operations within the _ssss_pppp_rrrr_oooo_cccc call itself.
  219.      Currently two flags are supported:
  220.  
  221.      PPPPRRRR____BBBBLLLLOOOOCCCCKKKK  causes the calling process to be blocked [see _bbbb_llll_oooo_cccc_kkkk_pppp_rrrr_oooo_cccc(2)]
  222.                before returning from a successful call.  This can be used to
  223.                allow the child process access to the parent's stack without
  224.                the possibility of collision.
  225.  
  226.      PPPPRRRR____NNNNOOOOLLLLIIIIBBBBCCCC causes the child to not join the C library (libc) arena (see
  227.                below).  If all _ssss_pppp_rrrr_oooo_cccc calls that a process makes specify this
  228.                flag then the C library arena will never be created.  The
  229.                creation of the C library arena includes the initialization of
  230.                the per-thread system error value _e_r_r_n_o.
  231.  
  232.      No scheduling synchronization is implied between shared processes: they
  233.      are free to run on any processor in any sequence.  Any required
  234.      synchronization must be provided by the application using locks and
  235.      semaphores [see _uuuu_ssss_iiii_nnnn_iiii_tttt(3P)] or other mechanisms.
  236.  
  237.      If one member of a share group exits or otherwise dies, its stack is
  238.      removed from the virtual space of the share group.  If the process which
  239.      first created the share group exits, its stack is not removed.  This
  240.      ensures continued access by other share group members to the environment
  241.      and starting argument vectors.  In addition, if the PPPPRRRR____SSSSEEEETTTTEEEEXXXXIIIITTTTSSSSIIIIGGGG option
  242.      [see _pppp_rrrr_cccc_tttt_llll(2)] has been enabled then all remaining members of the share
  243.      group will be signaled.
  244.  
  245.      By default, standard C library routines such as _pppp_rrrr_iiii_nnnn_tttt_ffff and _mmmm_aaaa_llll_llll_oooo_cccc
  246.      function properly even though two or more shared processes access them
  247.      simultaneously.  To accomplish this, a special arena is set up [see
  248.      _uuuu_ssss_iiii_nnnn_iiii_tttt(3P)] to hold the locks and semaphores required.  Unless the
  249.      PPPPRRRR____NNNNOOOOLLLLIIIIBBBBCCCC flag is present, the parent will initialize and each child will
  250.      join the C library arena.  Arenas have a configurable maximum number of
  251.      processes that can join, that is set when the arena is first created.
  252.      This maximum (default 8) can be configured using _uuuu_ssss_cccc_oooo_nnnn_ffff_iiii_gggg(3P).  Each
  253.      process in the share group needs access to this arena and requires a
  254.      single file lock [see _ffff_cccc_nnnn_tttt_llll(2)].  This may require more file locks to be
  255.      configured into the system than the default system configuration
  256.      provides.  Programs using share groups that are invoking system services
  257.      (either system calls or lllliiiibbbbcccc routines), should be compiled with the
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. SSSSPPPPRRRROOOOCCCC((((2222))))                                                              SSSSPPPPRRRROOOOCCCC((((2222))))
  269.  
  270.  
  271.  
  272.      feature test macro ____SSSSGGGGIIII____MMMMPPPP____SSSSOOOOUUUURRRRCCCCEEEE set in any file containing functions
  273.      that share group members might access (see CAVEATS section below).
  274.      Currently, this is only required for correct treatment of the system
  275.      error value _e_r_r_n_o (see discussion below) but in the future may be
  276.      required for the correct functioning of other services.
  277.  
  278.      _ssss_pppp_rrrr_oooo_cccc will fail and no new process will be created if one or more of the
  279.      following are true:
  280.  
  281.      [ENOMEM]       If there is not enough virtual space to allocate a new
  282.                     stack.  The default stack size is settable via _pppp_rrrr_cccc_tttt_llll(2),
  283.                     or _ssss_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt(2).
  284.  
  285.      [EAGAIN]       The system-imposed limit on the total number of processes
  286.                     under execution, {_N_P_R_O_C} [see iiiinnnnttttrrrroooo(2)], would be
  287.                     exceeded.
  288.  
  289.      [EAGAIN]       The system-imposed limit on the total number of processes
  290.                     under execution by a single user {_C_H_I_L_D__M_A_X} [see
  291.                     iiiinnnnttttrrrroooo(2)], would be exceeded.
  292.  
  293.      [EAGAIN]       Amount of system memory required is temporarily
  294.                     unavailable.
  295.  
  296.      [EINVAL]       _s_p was null and _l_e_n was less than 8192.
  297.  
  298.      [EPERM]        The system call is not permitted from a pthreaded program
  299.                     (see CAVEATS section below).
  300.  
  301.      When called with the PPPPRRRR____NNNNOOOOLLLLIIIIBBBBCCCC flag not set, in addition to the above
  302.      errors _ssss_pppp_rrrr_oooo_cccc will fail and no new process will be created if one or more
  303.      of the following are true:
  304.  
  305.      [ENOSPC]       If the size of the share group exceeds the number of users
  306.                     specified via _uuuu_ssss_cccc_oooo_nnnn_ffff_iiii_gggg(3P) (8 by default).  Any changes
  307.                     via _uuuu_ssss_cccc_oooo_nnnn_ffff_iiii_gggg(3P) must be done BEFORE the first _ssss_pppp_rrrr_oooo_cccc is
  308.                     performed.
  309.  
  310.      [ENOLCK]       There are not enough file locks in the system.
  311.  
  312.      [EACCES]       The shared arena file (located in /usr/tmp) used in
  313.                     conjunction with the C library could not be opened or
  314.                     created for read/write.
  315.  
  316.      _N_e_w _p_r_o_c_e_s_s _p_i_d # _c_o_u_l_d _n_o_t _j_o_i_n _I/_O _a_r_e_n_a:<..>
  317.                     if the new share group member could not properly join the
  318.                     C library arena.  The new process exits with a -1.
  319.  
  320.      See also the possible errors from _uuuu_ssss_iiii_nnnn_iiii_tttt(3P).
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. SSSSPPPPRRRROOOOCCCC((((2222))))                                                              SSSSPPPPRRRROOOOCCCC((((2222))))
  335.  
  336.  
  337.  
  338. NNNNOOOOTTTTEEEESSSS
  339.      IrisGL processes that share virtual address space will share access to
  340.      the graphics hardware and associated data structures.  IrisGL calls made
  341.      by such processes must be single threaded to avoid simultaneous access to
  342.      these resources.  Furthermore, _gggg_ffff_llll_uuuu_ssss_hhhh(3G) must be called prior to leaving
  343.      the critical section represented by the set of graphics calls.
  344.  
  345.      This manual entry has described ways in which processes created by _ssss_pppp_rrrr_oooo_cccc
  346.      differ from those created by _ffff_oooo_rrrr_kkkk.  Attributes and behavior not mentioned
  347.      as different should be assumed to work the same way for _ssss_pppp_rrrr_oooo_cccc processes
  348.      as for processes created by _ffff_oooo_rrrr_kkkk.  Here are some respects in which the
  349.      two types of processes are the same:
  350.  
  351.         The parent and child after an _ssss_pppp_rrrr_oooo_cccc each have a unique process id
  352.         (_p_i_d), but are in the same process group.
  353.  
  354.         A signal sent to a specific _p_i_d in a share group [see _kkkk_iiii_llll_llll(2)] will be
  355.         received by only the process to which it was sent.  Other members of
  356.         the share group will not be affected.  A signal sent to an entire
  357.         process group will be received by all the members of the process
  358.         group, regardless of share group affiliations [see _kkkk_iiii_llll_llll_pppp_gggg(3B)].  See
  359.         _pppp_rrrr_cccc_tttt_llll(2) for ways to alter this behavior.
  360.  
  361.         If the child process resulting from an _ssss_pppp_rrrr_oooo_cccc dies or calls _eeee_xxxx_iiii_tttt(2),
  362.         the parent process receives the SIGCLD signal [see _ssss_iiii_gggg_ssss_eeee_tttt(2),
  363.         _ssss_iiii_gggg_aaaa_cccc_tttt_iiii_oooo_nnnn(2), and _ssss_iiii_gggg_vvvv_eeee_cccc(3B)].
  364.  
  365. CCCCAAAAVVVVEEEEAAAATTTTSSSS
  366.      Removing virtual space (e.g. unmapping a file) is an expensive operation
  367.      and forces all processes in the share group to single thread their memory
  368.      management operations for the duration of the unmap system call.  The
  369.      reason for this is that the system must insure that no other processes in
  370.      the share group can reference the virtual space that is being removed or
  371.      the underlying physical pages during or after the removal.  To accomplish
  372.      this, the system memory management code does the following:
  373.  
  374.         Locks a lock on the share group that prevents any other process in the
  375.         group from doing any memory management operations (page faults,
  376.         protection faults, second level TLB misses, _mmmm_mmmm_aaaa_pppp(2), _mmmm_uuuu_nnnn_mmmm_aaaa_pppp(2),
  377.         _ssss_bbbb_rrrr_kkkk(2)).
  378.  
  379.         Sends TLB shootdown interrupts to all other cpus in the system that
  380.         cause them to remove any entries from the processor's Translation
  381.         Lookaside Buffer (TLB) for the share group for the address range being
  382.         deleted.
  383.  
  384.         Removes the virtual mapping from the share group's memory management
  385.         data structures and frees any underlying physical pages.
  386.  
  387.         Releases the lock to allow parallel operations to continue.
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. SSSSPPPPRRRROOOOCCCC((((2222))))                                                              SSSSPPPPRRRROOOOCCCC((((2222))))
  401.  
  402.  
  403.  
  404.      _pppp_iiii_xxxx_iiii_eeee(1) and _pppp_rrrr_oooo_ffff(1) do not work on processes that call _ssss_pppp_rrrr_oooo_cccc and do not
  405.      share address space (i.e.  PPPPRRRR____SSSSAAAADDDDDDDDRRRR is not set).
  406.  
  407.      Note that the global variable _e_r_r_n_o is normally a single location shared
  408.      by all processes in a share group in which address space is a shared
  409.      attribute.  This means that if multiple processes in the group make
  410.      system calls or other library functions which set _e_r_r_n_o, the value of
  411.      _e_r_r_n_o is no longer useful, since it may be overwritten at any time by a
  412.      call in another process in the share group.  To have each thread have its
  413.      own private version of _e_r_r_n_o, programs should be compiled with the
  414.      feature test macro ____SSSSGGGGIIII____MMMMPPPP____SSSSOOOOUUUURRRRCCCCEEEE defined before including the header
  415.      file _e_r_r_n_o._h.  Note however that some system supplied libraries have not
  416.      been converted to set the per-thread error value - they will only set the
  417.      global error value.  This will be corrected in future releases.  This
  418.      means an application compiled with ______SSSS_GGGG_IIII______MMMM_PPPP______SSSS_OOOO_UUUU_RRRR_CCCC_EEEE and directly
  419.      referencing _e_r_r_n_o will reference the per-thread error value and not get
  420.      the global error value that a non-converted library might have set.
  421.      There are two workarounds to this problem: 1) define the feature test
  422.      macro ______SSSS_GGGG_IIII______MMMM_PPPP______SSSS_OOOO_UUUU_RRRR_CCCC_EEEE only in files that test _e_r_r_n_o as the result of an
  423.      error from a function defined in _l_i_b_c, _l_i_b_w, _l_i_b_m, _l_i_b_a_d_m, _l_i_b_g_e_n, or
  424.      _l_i_b_m_a_l_l_o_c; or 2) for accesses of _e_r_r_n_o in response to errors from
  425.      functions not in one of the above mentioned libraries, call _gggg_oooo_ssss_eeee_rrrr_rrrr_oooo_rrrr(3C)
  426.      (which always returns the global error value).  _pppp_eeee_rrrr_rrrr_oooo_rrrr(3C) always reads
  427.      the 'appropriate' error value so for a threaded application it will read
  428.      the per-thread value.  This means that threaded programs that call errno
  429.      setting functions in non-converted libraries and attempt to have _pppp_eeee_rrrr_rrrr_oooo_rrrr
  430.      print out the error will not get the correct error value.  In this case
  431.      _s_t_r_e_r_r_o_r(_g_o_s_e_r_r_o_r()) should be used instead.
  432.  
  433.      _rrrr_llll_dddd(1) does not support execution of _ssss_pppp_rrrr_oooo_cccc during shared object
  434.      initialization, such as that described under the -init flag to _llll_dddd(1).  In
  435.      particular, C++ users must take care that their code does not contain
  436.      global objects which have constructors which call _ssss_pppp_rrrr_oooo_cccc(2).  Should
  437.      _ssss_pppp_rrrr_oooo_cccc(2) be called during object initialization, results will generally
  438.      be non-deterministic and unpredictable.
  439.  
  440.      The _ssss_pppp_rrrr_oooo_cccc model of threading is incompatible with POSIX threads.
  441.      Attempts to create an sproc process from a pthreaded program will be
  442.      rejected [see _pppp_tttt_hhhh_rrrr_eeee_aaaa_dddd_ssss(5)].
  443.  
  444. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  445.      blockproc(2), fcntl(2), fork(2), intro(2), prctl(2), setrlimit(2),
  446.      goserror(3C), oserror(3C), pcreate(3C), pthreads(5), usconfig(3P),
  447.      usinit(3P), rld(1), ld(1).
  448.  
  449. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  450.      Upon successful completion, _ssss_pppp_rrrr_oooo_cccc returns the process id of the new
  451.      process.  Otherwise, a value of -1 is returned to the calling process,
  452.      and _e_r_r_n_o is set to indicate the error.
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.